<?php
$dateToday=date("Y-m-d");
$filename=$_GET['filename'];
$orgFile = fopen($filename,"r");
$counter=0;
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title><?php echo $dateToday; ?> Waiting For Payment </title>
</head>

<body style="margin:0;">
<H1>POST SLIPS on <?php echo $dateToday;?>  Sign By :_____________<H1>
<table width="1000" border="1" cellspacing="0" cellpadding="0" style="font-family:Arial; font-size:12px;
border-color:#666; border-style:solid border-width:1px;">
  <tr>
  	<td style="width:30px;">NOT<br />Today</td>
    <td style="width:50px;">#Order</td>
    <td style="width:70px;">Thumb</td>
    <td style="width:200px;">Title</td>
    <td style="width:30px;">Qty</td>
    <td style="width:200px;">Customer Label</td>
    <td style="width:50px;">Price</td>
    <td style="width:150px;">Address</td>
    <td style="width:50px;">PostType&amp;Fee</td>
    <td style="width:50px;">PACKED</td>
    <td style="width:200px;">Tracking Label</td>
  </tr>
<?php
while(($lineData = fgetcsv($orgFile,0))!= FALSE){
	if($counter>0){
?>  
  <tr>
  	<td>&nbsp;</td>
    <td><?php echo $lineData[0]?></td>
    <td><img src="http://thumbs.ebaystatic.com/pict/<?php echo $lineData[12]?>6464_.jpg" border="0" /></td>
    <td><?php echo $lineData[14]?></td>
    <td><?php
    if($lineData[15]>1){
		echo "<b style=\"font-size:16px;\">[".$lineData[15]."]</b>";
		}
	else{
		echo $lineData[15];
		}	
	
	?></td>
    <td valign="top"><?php echo $lineData[31]?><br /><?php echo $lineData[30]?><br />
    _ _ _ _ _ _ _ _ _ _ _ _ _ _ _</td>
    <td><?php echo $lineData[16]?></td>
    <td><?php echo "[".$lineData[1]."]".$lineData[2]."<br />".$lineData[5].$lineData[6]."<br />".$lineData[7].$lineData[8].$lineData[9];   ?></td>
    <td valign="top"><?php echo $lineData[27]?><br /><?php echo $lineData[17]?></td>
    <td valign="top">&nbsp;</td>
    <td valign="top">&nbsp;</td>
  </tr>
<?php
	}
	$counter++;
}
?>
</table>
</body>
</html>